<?php

namespace App\Http\Controllers;

class BaseController extends Controller {
    public $request;
    public function __construct() {
    }

    public function returnJson($data, $message = "", $status = 200, $httpCode = false) {
        $result = [
            "status" => $status,
            "data" => $data,
            "message" => $message
        ];
        return response()->json($result, $httpCode ? $status : 200);
    }
}
